The compiler automatically marshals the delegate to unmanaged functions as a function pointer and inserts the necessary managed unmanaged transition code 编译器自动将委托作为函数指针封送给非托管函数,并插入必要的托管/非托管转换代码。
2.
The result is a managed entry point for each native dll function that contains the necessary transition code or thunk and simple data conversions 得到的结果是每个本机dll函数的托管入口点,其中包含必需的转换代码(或thunk )和简单数据转换。
3.
This is possible due to c interop features that cause the compiler to automatically insert the transition code to move from managed to unmanaged functions and back again 这是可能的,因为c + + interop的功能可导致编译器自动插入转换代码以在托管和非托管函数之间移动。